package com.parkingspace.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.parkingspace.entity.Complain;

import java.util.List;

/**
 * <p>
 * 投诉表 服务类
 * </p>
 *
 * @author Gapper
 * @since 2021-05-24
 */
public interface IComplainService extends IService<Complain> {

	/**
	 * 新建投诉
	 * @param complain 传入内容,用户ID和名称不用传传入token就可以了
	 * @return 返回Boolean
	 * @throws Exception
	 */
	Boolean insertComplain (String token, Complain complain) throws Exception;

	/**
	 * 根据订单ID查询该订单受到的投诉
	 * @param ordereid 传入订单ID
	 * @return 返回List,如何没有返回0
	 * @throws Exception
	 */
	List<Complain> findByOrderId (Long ordereid) throws Exception;

}
